package com.etrans.web.gps.business.alarm.domain;

import java.io.Serializable;

/**
 * 实时报警数据分时段分组统计类
 * 
 * @author lxd
 *
 */
public class AlarmHourStatistics implements Serializable,Comparable<AlarmHourStatistics> {

	private static final long serialVersionUID = -7512364116025765040L;

	/**
	 * 报警类型
	 */
	private Integer alarmType;

	/**
	 * 报警名称
	 */
	private String hour;

	/**
	 * 报警车辆总数
	 */
	private Integer count;

	/**
	 * 报警车辆id
	 */
	private String vehicleIds;

	public Integer getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(Integer alarmType) {
		this.alarmType = alarmType;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getVehicleIds() {
		return vehicleIds;
	}

	public void setVehicleIds(String vehicleIds) {
		this.vehicleIds = vehicleIds;
	}

	public String getHour() {
		return hour;
	}

	public void setHour(String hour) {
		this.hour = hour;
	}

	private int getCompareHour(){
		String[] hours = this.hour.split(":");
		return Integer.parseInt(hours[0].trim());
	}

	@Override
	public int compareTo(AlarmHourStatistics o) {
		return this.getCompareHour() - o.getCompareHour();
	}
}
